package org.example.petitionplatformsystem.service;

import org.example.petitionplatformsystem.dao.model.PetitionEvents;

import java.util.List;
import java.util.Map;

public interface PetitionEventsService {
    public PetitionEvents addPetitionEvent(PetitionEvents petitionEvent);

    public PetitionEvents updatePetitionEvent(PetitionEvents petitionEvent);

    public void deletePetitionEvent(PetitionEvents petitionEvent);

    public PetitionEvents getPetitionEventById(long id);

    public List<PetitionEvents> getAllPetitionEvents();
    public List<PetitionEvents> getAllPetitionEventsByUserId(long userId);
    public PetitionEvents getPetitionEventByPetitionIdAndUserid(long petitionId, long userId);
    //用spark统计关键词数据
    public List<Map<String, Object>> getKeywordsCounts();
    public List<Map<String,Object>> getTitleKeywordsCounts();
    //用spark统计基础信访数据
    public Map<String,Object> getPetitionInfodata();
    public List<Map<String,Object>> getPetitionCountsByDay();
    public List<Map<String,Object>> getPetitionCountsByWeek();
    public List<Map<String,Object>> getPetitionCountsByMonth();
    public Map<String,Object> getPetitionCountsByDayAndStatus(String dateStr);


    public List<PetitionEvents> getNotApproved();

    public List<PetitionEvents> getEventByWorkId(Long workId);
    public List<PetitionEvents> getEventByStatus(Long status);

}
